#include "D:\MyCode\cpp-basic-practice\MultiRelationalMessageFolder\Message.h"
#include "D:\MyCode\cpp-basic-practice\MultiRelationalMessageFolder\Folder.h"
#include <iostream>

int main() {
    // 创建两个文件夹
    Folder folder1("Folder1");
    Folder folder2("Folder2");

    // 创建两条消息
    Message msg1("Message 1");
    Message msg2("Message 2");

    // 测试 save 方法，将消息添加到文件夹中
    msg1.save(folder1);
    msg2.save(folder2);
    std::cout << "Messages saved to folders." << std::endl;

    // 测试 remove 方法，将消息从文件夹中移除
    msg1.remove(folder1);
    std::cout << "Message 1 removed from Folder 1." << std::endl;

    // 测试拷贝构造函数
    Message msg3(msg1);
    std::cout << "Message 3 created using copy constructor." << std::endl;

    // 测试赋值运算符
    msg3 = msg2;
    std::cout << "Message 3 assigned the value of Message 2." << std::endl;

    // 测试 swap 方法
    Message::swap(msg1, msg2);
    std::cout << "Message 1 and Message 2 swapped." << std::endl;

    // 测试 Folder 的拷贝构造函数
    Folder folder3(folder1);
    std::cout << "Folder 3 created using copy constructor." << std::endl;

    // 测试 Folder 的赋值运算符
    folder3 = folder2;
    std::cout << "Folder 3 assigned the value of Folder 2." << std::endl;

    return 0;
}
